<table width="100%">
<caption><h1>Article list</h1><span><?=html::anchor('article/create', '添加')?></span></caption>
<thead><tr><td colspan="5">
	<span style="float:left;">过滤条件： 分类<?=form::dropdown('category_id', $categories, (($type=='category') ? $id : ''), 'onchange="window.location=\'/article/filter/category/\'+this.value+\'/1\'";')?>
	版块<?=form::dropdown('block_id', $blocks, (($type=='block') ? $id : ''), 'onchange="window.location=\'/article/filter/block/\'+this.value+\'/1\'";')?></span>
	<form method="post" action="/article/search" style="float:right;">
		<input type="text" name="keyword" style="width:100px;"/>
		<select name="type">
			<option value="id">ID</option>
			<option value="title">Title</option>
			<option value="name">Name</option>
		</select>
		<input type="submit" value="搜索"/>
	</form>
</td></tr>
<tr>
	<th width="5%">ID</th>
	<th width="20%">Name</th>
	<th width="30%">Chinese Title</th>
	<th width="30%">English Title</th>
	<th width="15%">操作</th>
</tr>
</thead>
<tbody id="myTable">
<?php foreach($datas as $data) { ?>
<tr>
	<td><?=$data->id?></td>
	<td><?=$data->name?></td>
	<td><?=$data->title_cn?></td>
	<td><?=$data->title_en?></td>
	<td>
		<?=html::anchor(Router::$controller.'/view/'.$data->id, 'View')?>
		<?=html::anchor(Router::$controller.'/edit/'.$data->id, 'Edit')?>
	</td>
</tr>
<?php } ?>
</tbody>
</table>
<?=isset($this->pagination) ? $this->pagination->create_links() : ''?>
<?=html::script('js/table.js')?>
